package com.fr.data.core.db.handler;

import com.fr.data.core.db.dialect.Dialect;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class ByteArrayTypeHandler
  implements SQLTypeHandler
{
  public void setValue(PreparedStatement paramPreparedStatement, int paramInt1, Object paramObject, int paramInt2, Dialect paramDialect)
    throws SQLException
  {
    if (paramObject instanceof byte[])
      paramPreparedStatement.setBytes(paramInt1, (byte[])paramObject);
  }

  public Object getValue(ResultSet paramResultSet, int paramInt1, int paramInt2, Dialect paramDialect)
    throws SQLException
  {
    return paramResultSet.getBytes(paramInt1);
  }
}